#include <iostream>
#include<stdio.h>
#include<algorithm>
#include <math.h>
#include<string>
#include<vector>
using namespace std;
void QuickSort(vector<int>&arr, int s, int e)
{
	if (s >= e)return;
	int i = s;
	int j = e;
	while (i < j)
	{
		while (i < j&&arr[j] >= arr[s])j--;
		while (i < j&&arr[i] <= arr[s])i++;
		swap(arr[i], arr[j]);
	}
	swap(arr[s], arr[j]);
	QuickSort(arr, s, j-1);
	QuickSort(arr, j+1, e);
}
int main()
{
	int n;
	while (cin >> n)
	{
		vector<int>arr(n);
		for (int i = 0; i < n; i++)
		{
			cin >> arr[i];
		}
		QuickSort(arr, 0, n - 1);
		for (int i = 0; i < n; i++)
		{
			cout<< arr[i]<<' ';
		}
		cout << endl;
	}
	return 0;
}